package com.ruibang.glass.quality.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * <p>
 * 每小时归档缺陷统计信息
 * </p>
 *
 * @author wujie
 * @since 2023-12-13
 */

@ApiModel(value ="每小时归档缺陷统计信息")
@TableName("g_everyhour_archive_defect")
@Data
public class EveryHourArchiveDefect {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @ApiModelProperty(value = "缺陷时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime defectTime;
    @ApiModelProperty(value = "气泡判废数")
    private int bubbleDiscardNum;
    @ApiModelProperty(value = "开口泡判废数")
    private int openBubbleDiscardNum;
    @ApiModelProperty(value = "结石判废数")
    private int stoneDiscardNum;
    @ApiModelProperty(value = "铂金判废片数")
    private int platinumDiscardNum;
    @ApiModelProperty(value = "成品检查数")
    private int finishCheckNum;
    @ApiModelProperty(value = "待返投数")
    private int reinvestmentNum;
    @ApiModelProperty(value = "气泡判废率")
    private float bubbleDiscardRate;
    @ApiModelProperty(value = "开口泡判废率")
    private float openBubbleDiscardRate;
    @ApiModelProperty(value = "结石判废率")
    private float stoneDiscardRate;
    @ApiModelProperty(value = "铂金判废率")
    private float platinumDiscardRate;
    @ApiModelProperty(value = "检查机code")
    private String checkMachineCode;

    @TableField(exist = false)
    private String defectTimeKey;
}
